﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace Test
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int[] arr = {1,2 ,9,8,100000,3,4};
            //数组排序
            Array.Sort(arr);
            //数组反转
            Array.Reverse(arr);
            //从数组中找9这个数字,找到了返回9的下标,没找到返回-1
            int[] arr01 = new int[arr.Length];
            Array.Copy(arr, arr01, arr01.Length);
           //int index = Array.IndexOf(arr, 9);
            //Console.WriteLine(index);
            arr01[0] = 1;
            foreach (int i in arr01) 
            {
                Console.WriteLine(i);
            }
            foreach (int i in arr)
            {
                Console.WriteLine(i);
                Console.WriteLine();
            }

            //Console.ReadKey();
            //int[] arr01 = new int[]{ };
            //arr01 = arr;
            //Console.WriteLine(arr01[0]);
            //foreach (int i in arr01)
            //{
            //    Console.WriteLine(i);
            //}
        }
    }
}
